Optimal. Leaf size=87 \[ \frac {3 \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {1}{8} x \left (3 a^2+2 a b+3 b^2\right )+\frac {(a-b) \sin (c+d x) \cos ^3(c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3675, 413, 385, 203} \[ \frac {3 \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {1}{8} x \left (3 a^2+2 a b+3 b^2\right )+\frac {(a-b) \sin (c+d x) \cos ^3(c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 385
Rule 413
Rule 3675
Rubi steps
\begin {align*} \int \cos ^4(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b x^2\right )^2}{\left (1+x^2\right )^3} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {(a-b) \cos ^3(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d}+\frac {\operatorname {Subst}\left (\int \frac {a (3 a+b)+b (a+3 b) x^2}{\left (1+x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{4 d}\\ &=\frac {3 \left (a^2-b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {(a-b) \cos ^3(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d}+\frac {\left (3 a^2+2 a b+3 b^2\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{8 d}\\ &=\frac {1}{8} \left (3 a^2+2 a b+3 b^2\right ) x+\frac {3 \left (a^2-b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {(a-b) \cos ^3(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.33, size = 65, normalized size = 0.75 \[ \frac {4 \left (3 a^2+2 a b+3 b^2\right ) (c+d x)+8 \left (a^2-b^2\right ) \sin (2 (c+d x))+(a-b)^2 \sin (4 (c+d x))}{32 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 75, normalized size = 0.86 \[ \frac {{\left (3 \, a^{2} + 2 \, a b + 3 \, b^{2}\right )} d x + {\left (2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{3} + {\left (3 \, a^{2} + 2 \, a b - 5 \, b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.79, size = 122, normalized size = 1.40 \[ \frac {b^{2} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+2 a b \left (-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )+a^{2} \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.76, size = 97, normalized size = 1.11 \[ \frac {{\left (3 \, a^{2} + 2 \, a b + 3 \, b^{2}\right )} {\left (d x + c\right )} + \frac {{\left (3 \, a^{2} + 2 \, a b - 5 \, b^{2}\right )} \tan \left (d x + c\right )^{3} + {\left (5 \, a^{2} - 2 \, a b - 3 \, b^{2}\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.24, size = 93, normalized size = 1.07 \[ x\,\left (\frac {3\,a^2}{8}+\frac {a\,b}{4}+\frac {3\,b^2}{8}\right )-\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (-\frac {5\,a^2}{8}+\frac {a\,b}{4}+\frac {3\,b^2}{8}\right )-{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (\frac {3\,a^2}{8}+\frac {a\,b}{4}-\frac {5\,b^2}{8}\right )}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2} \cos ^{4}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________